package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.redepronik.negosys.rrhh.entity.Empleadocargo;

/**
 * The persistent class for the localempleadocargo database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "localempleadocargo")
@NamedQuery(name = "Localempleadocargo.findAll", query = "SELECT l FROM Localempleadocargo l")
public class Localempleadocargo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "LOCALEMPLEADOCARGO_LOCALEMPLEADOCARGOID_GENERATOR", sequenceName = "INVFAC.LOCALEMPLEADOCARGO_LOCALEMPLEADOCARGOID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "LOCALEMPLEADOCARGO_LOCALEMPLEADOCARGOID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer localempleadocargoid;

	// bi-directional many-to-one association to empleadoCargo
	@ManyToOne
	@JoinColumn(name = "empleadocargoid", nullable = false)
	private Empleadocargo empleadocargo;

	// bi-directional many-to-one association to Local
	@ManyToOne
	@JoinColumn(name = "localid", nullable = false)
	private Local local;

	@Column(nullable = false)
	private Boolean activo;

	public Localempleadocargo() {
	}

	public Boolean getActivo() {
		return activo;
	}

	public Empleadocargo getEmpleadocargo() {
		return empleadocargo;
	}

	public Local getLocal() {
		return this.local;
	}

	public Integer getLocalempleadocargoid() {
		return localempleadocargoid;
	}

	public void setActivo(Boolean activo) {
		this.activo = activo;
	}

	public void setEmpleadocargo(Empleadocargo empleadocargo) {
		this.empleadocargo = empleadocargo;
	}

	public void setLocal(Local local) {
		this.local = local;
	}

	public void setLocalempleadocargoid(Integer localempleadocargoid) {
		this.localempleadocargoid = localempleadocargoid;
	}

}